#pragma once

#include <IXBaseObj.h>

class ExportXSkinLib IXThemeListener
{
public:
    IXThemeListener();
    virtual ~IXThemeListener();

    virtual HRESULT STDMETHODCALLTYPE   OnThemeChanged(eSkinSettingFlag flag, LPARAM lParam) = 0;
};

class ExportXSkinLib IXTheme : public IXBaseObj
{
    DEF_INTERFACE(IXTheme, _T("{41619F28-70B9-4299-97B5-60C1039F7646}"));

public:
    /**
     *
     * @return: S_OK if successfully, S_FALSE if restarting need, E_FAIL if failed(like no such language)
     *
     * 
     */
    virtual HRESULT STDMETHODCALLTYPE   put_Lang(IN LPCTSTR szLang) = 0;
    virtual HRESULT STDMETHODCALLTYPE   get_Lang(OUT BSTR* pbstrLang) = 0;

    virtual HRESULT STDMETHODCALLTYPE   put_HSL(IN int nHue, IN int nSat, IN int nLight) = 0;
    virtual HRESULT STDMETHODCALLTYPE   get_HSL(OUT int* pnHue, OUT int* pnSat, OUT int* pnLight) = 0;

    virtual HRESULT STDMETHODCALLTYPE   AddThemeListener(IXThemeListener* pListener) = 0;
    virtual HRESULT STDMETHODCALLTYPE   RemoveThemeListener(IXThemeListener* pListener) = 0;

    virtual COLORREF STDMETHODCALLTYPE  AdjustColor(COLORREF Color) = 0;
};
